﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FantastPlatform.Framework.IModel;

namespace FantastPlatform.Framework.IService
{
    public interface IPermissionService:IDataService<IPermission>
    {
        /// <summary>
        /// 根据许可ID得到该许可下的角色
        /// </summary>
        /// <param name="permissionId"></param>
        /// <returns></returns>
        IList<IRole> GetRolesByPermissionId(int permissionId);
        /// <summary>
        /// 根据许可ID得到许可关联的角色
        /// </summary>
        /// <param name="permissionId"></param>
        /// <returns></returns>
        IResource GetResourceByPermissionId(int permissionId);
        /// <summary>
        /// 根据许可ID得到许可关联的操作
        /// </summary>
        /// <param name="permissionId"></param>
        /// <returns></returns>
        IOperation GetOperationByPermissionId(int permissionId);
    }
}
